package com.genia.service.impl;

import com.genia.dao.UserDao;
import com.genia.entity.User;
import com.genia.service.UserService;

public class UserServiceImpl implements UserService {
    private UserDao userDao;

    public void setUserDao(UserDao userDao){
        this.userDao=userDao;
    }

    @Override
    public int addUser(User user) {
        int res = userDao.insertUser(user);
        return res;
    }

    @Override
    public User queryUser(String name,String pwd) {
        User user = (User) userDao.selectUser(name,pwd);
        return user;
    }
}
